﻿using System.ComponentModel;
using Silverlight.Training.Client.Common.ServiceReference.Feedbacks;

namespace Silverlight.Training.Client.Common.ServiceReference.EventArgs
{
    public class FeedbackCompletedEventArgs<T> : AsyncCompletedEventArgs
    {
        private object[] results;

        public FeedbackCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) :
            base(exception, cancelled, userState)
        {
            this.results = results;
        }

        public Feedback Result
        {
            get
            {
                base.RaiseExceptionIfNecessary();
                return ((Feedback)(this.results[0]));
            }
        }
    }
}
